Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculate historic daily calorie supply #2685

Merged
merged 24 commits into from
May 29, 2024
Merged

Conversation

pabloarosado
Copy link
Contributor

@pabloarosado pabloarosado commented May 23, 2024

I created a new dataset for the historical daily calorie supply, combining many different sources for different countries.
For more details, see https://github.com/owid/owid-issues/issues/1493

Chart diff also shows additional changes on charts from other datasets, becauase also I did a few additional updates (on related datasets):

  • Ensured we always refer to "daily calorie supply" instead of "consumption" or "intake" in various charts.
  • Replaced Meat consumption in the US (USDA, 2018) with data from FAOSTAT. The number from FAOSTAT are significantly higher (while the shape of the curves is similar). I don't know what the original data was exactly, so I can't tell the reason for this discrepancy. Maybe the original USDA data was the Loss-Adjusted Food Availability (which we have found some criticism about). So, for now, I think. it's best to keep using FAOSTAT. At some point we can move back to USDA (they actually have much more data, and probably FAOSTAT relies on them).
  • Replaced Daily protein supply - FAO (2017) with data from FAOSTAT.

@pabloarosado pabloarosado self-assigned this May 23, 2024
@owidbot
Copy link
Contributor

owidbot commented May 23, 2024

Quick links (staging server):

Site Admin Wizard

Login: ssh owid@staging-site-add-daily-calories-data

chart-diff: ❌
  • 2 new charts (0 approved)
  • 15 modified charts (0 approved)
data-diff: ❌ Found differences
+ Dataset garden/agriculture/2024-05-23/daily_calories_per_person
+ + Table daily_calories_per_person
+   + Column daily_calories
+   + Column source
= Dataset garden/faostat/2024-03-14/additional_variables
  = Table hypothetical_meat_consumption
  = Table cereal_allocation
  = Table fertilizer_exports
  = Table agriculture_land_use_evolution
  = Table vegetable_oil_yields
  = Table macronutrient_compositions
    ~ Column energy_from_animal_products (changed metadata)
-       - title: Daily caloric intake per person from animal products
        ?                    -------
+       + title: Daily calorie supply per person from animal products
        ?                     +++++++
    ~ Column energy_from_animal_protein (changed metadata)
-       - title: Daily caloric intake per person that comes from animal protein
        ?                    -------
+       + title: Daily calorie supply per person that comes from animal protein
        ?                     +++++++
    ~ Column energy_from_vegetal_products (changed metadata)
-       - title: Daily caloric intake per person from vegetal products
        ?                    -------
+       + title: Daily calorie supply per person from vegetal products
        ?                     +++++++
    ~ Column energy_from_vegetal_protein (changed metadata)
-       - title: Daily caloric intake per person that comes from vegetal protein
        ?                    -------
+       + title: Daily calorie supply per person that comes from vegetal protein
        ?                     +++++++
    ~ Column fat_from_animal_products (changed metadata)
-       - title: Daily fat intake per person from animal products
        ?                  ^^^^^^
+       + title: Daily fat supply per person from animal products
        ?                  ^^^^^^
    ~ Column fat_from_vegetal_products (changed metadata)
-       - title: Daily fat intake per person from vegetal products
        ?                  ^^^^^^
+       + title: Daily fat supply per person from vegetal products
        ?                  ^^^^^^
    ~ Column protein_from_animal_products (changed metadata)
-       - title: Daily protein intake from animal products
        ?                      ^^^^^^
+       + title: Daily protein supply from animal products
        ?                      ^^^^^^
    ~ Column protein_from_vegetal_products (changed metadata)
-       - title: Daily protein intake per person from vegetal products
        ?                      ^^^^^^
+       + title: Daily protein supply per person from vegetal products
        ?                      ^^^^^^
    ~ Column share_of_energy_from_animal_protein (changed metadata)
-       - title: Share of the daily caloric intake that comes from animal protein
        ?                                 -------
+       + title: Share of the daily calorie supply that comes from animal protein
        ?                                  +++++++
    ~ Column share_of_energy_from_carbohydrates (changed metadata)
-       - title: Share of the daily caloric intake that comes from carbohydrates
        ?                                 -------
+       + title: Share of the daily calorie supply that comes from carbohydrates
        ?                                  +++++++
    ~ Column share_of_energy_from_fat (changed metadata)
-       - title: Share of the daily caloric intake that comes from fat
        ?                                 -------
+       + title: Share of the daily calorie supply that comes from fat
        ?                                  +++++++
    ~ Column share_of_energy_from_protein (changed metadata)
-       - title: Share of the daily caloric intake that comes from protein
        ?                                 -------
+       + title: Share of the daily calorie supply that comes from protein
        ?                                  +++++++
    ~ Column share_of_energy_from_vegetal_protein (changed metadata)
-       - title: Share of the daily caloric intake that comes from vegetal protein
        ?                                 -------
+       + title: Share of the daily calorie supply that comes from vegetal protein
        ?                                  +++++++
    ~ Column total_carbohydrates (changed metadata)
-       - title: Daily carbohydrates intake per person
        ?                            ^^^^^^
+       + title: Daily carbohydrates supply per person
        ?                            ^^^^^^
    ~ Column total_energy (changed metadata)
-       - title: Daily caloric intake per person
        ?                    -------
+       + title: Daily calorie supply per person
        ?                     +++++++
    ~ Column total_energy_from_carbohydrates (changed metadata)
-       - title: Daily caloric intake per person from carbohydrates
        ?                    -------
+       + title: Daily calorie supply per person from carbohydrates
        ?                     +++++++
    ~ Column total_energy_from_fat (changed metadata)
-       - title: Daily caloric intake per person from fat
        ?                    -------
+       + title: Daily calorie supply per person from fat
        ?                     +++++++
    ~ Column total_energy_from_protein (changed metadata)
-       - title: Daily caloric intake per person from protein
        ?                    -------
+       + title: Daily calorie supply per person from protein
        ?                     +++++++
    ~ Column total_fat (changed metadata)
-       - title: Daily fat intake per person
        ?                  ^^^^^^
+       + title: Daily fat supply per person
        ?                  ^^^^^^
    ~ Column total_protein (changed metadata)
-       - title: Daily protein intake per person
        ?                      ^^^^^^
+       + title: Daily protein supply per person
        ?                      ^^^^^^
  = Table food_available_for_consumption
    ~ Column alcoholic_beverages (changed metadata)
-       - title: Daily caloric intake per person from alcoholic beverages
        ?                    -------
+       + title: Daily calorie supply per person from alcoholic beverages
        ?                     +++++++
    ~ Column cereals_and_grains (changed metadata)
-       - title: Daily caloric intake per person from cereals and grains
        ?                    -------
+       + title: Daily calorie supply per person from cereals and grains
        ?                     +++++++
    ~ Column dairy_and_eggs (changed metadata)
-       - title: Daily caloric intake per person from dairy and eggs
        ?                    -------
+       + title: Daily calorie supply per person from dairy and eggs
        ?                     +++++++
    ~ Column fruits_and_vegetables (changed metadata)
-       - title: Daily caloric intake per person from fruits and vegetables
        ?                    -------
+       + title: Daily calorie supply per person from fruits and vegetables
        ?                     +++++++
    ~ Column meat (changed metadata)
-       - title: Daily caloric intake per person from meat
        ?                    -------
+       + title: Daily calorie supply per person from meat
        ?                     +++++++
    ~ Column oils_and_fats (changed metadata)
-       - title: Daily caloric intake per person from oils and fats
        ?                    -------
+       + title: Daily calorie supply per person from oils and fats
        ?                     +++++++
    ~ Column other (changed metadata)
-       - title: Daily caloric intake per person from other commodities
        ?                    -------
+       + title: Daily calorie supply per person from other commodities
        ?                     +++++++
    ~ Column pulses (changed metadata)
-       - title: Daily caloric intake per person from pulses
        ?                    -------
+       + title: Daily calorie supply per person from pulses
        ?                     +++++++
    ~ Column starchy_roots (changed metadata)
-       - title: Daily caloric intake per person from starchy roots
        ?                    -------
+       + title: Daily calorie supply per person from starchy roots
        ?                     +++++++
    ~ Column sugar (changed metadata)
-       - title: Daily caloric intake per person from sugar
        ?                    -------
+       + title: Daily calorie supply per person from sugar
        ?                     +++++++
  = Table share_of_sustainable_and_overexploited_fish
  = Table fertilizers
  = Table maize_and_wheat
  = Table land_spared_by_increased_crop_yields
  = Table area_used_per_crop_type
  = Table arable_land_per_crop_output


Legend: +New  ~Modified  -Removed  =Identical  Details
Hint: Run this locally with etl diff REMOTE data/ --include yourdataset --verbose --snippet

Automatically updated datasets matching weekly_wildfires|excess_mortality|covid|fluid|flunet|country_profile are not included

Edited: 2024-05-29 14:24:22 UTC
Execution time: 38.71 seconds

@pabloarosado pabloarosado requested a review from spoonerf May 29, 2024 10:16
@pabloarosado pabloarosado marked this pull request as ready for review May 29, 2024 10:16
Copy link
Contributor

@spoonerf spoonerf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, very methodical, and incredibly well documented!

@pabloarosado pabloarosado merged commit db16d8c into master May 29, 2024
9 of 10 checks passed
@pabloarosado pabloarosado deleted the add-daily-calories-data branch May 29, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants